<template>
  <!-- <common> -->
    <div class="ve_container">
      <el-card :body-style="{ background: '#fff' }">
        <h1  >管理后台</h1>
        <transition name="el-fade-in-linear">
          <el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" class="demo-ruleForm" 
            status-icon>
            <el-form-item prop="name">
              <el-input class="inputs" v-model="ruleForm.name" placeholder="用户名：admin" />
            </el-form-item>
            <el-form-item prop="count">
              <el-input class="inputs" v-model="ruleForm.count" placeholder="密码：123456" />
            </el-form-item>
            <el-form-item>
              <div class="boxaa">
                <el-button @click="reset(ruleFormRef)">重置</el-button>
                <el-button type="warning" @click="logins">登录</el-button>
              
              </div>
              <!-- <img src="../../" alt=""> -->
            </el-form-item>
          </el-form>
        </transition>
      </el-card>
    </div>
  <!-- </common> -->



</template>

<script setup>
 
  import { reactive, ref } from 'vue'

  import { useRouter } from "vue-router";

  const ruleForm = reactive({
    name: 'test',
    count: '123',

  })
  let ruleFormRef = ref(null)
  const rules = {
    name: [{ required: true, message: "请输入用户名", trigger: "blur" }],
    count: [{ required: true, message: "请输入密码", trigger: "blur" }],
  };
 
  const reset = (formEl) => {
    if (!formEl) return
    formEl.resetFields()
  }
  const router = useRouter();
const getindex=()=>{
  console.log("122222",router)

  router.push("/home")
}
  const logins =  () => {
  
        // router.push("/PhotoVr")
        router.push("/home")


     
  }
</script>

<style lang="scss" scoped>
  .boxaa {
    width: 100%;
    display: flex;
    justify-content: space-between;

    .el-button {
      width: 45%;
      height: 40px;
      border-radius: 20px;
    }
  }

  .el-input__wrapper {
    padding-left: 20px !important;
  }

  .inputs {
    /* margin-left: 20px !important; */
    height: 45px;
  }

  .ve_container {
    position: absolute;
    z-index: 1;
    width: 400px;
    top: 50%;
    left: 100px;
    transform: translateY(-50%);
    transition: all 1s;
    min-height: 273px;
    text-align: center;

    h1 {
      font-size: 24px;
      transition: all 1s;
      font-weight: bold;
      margin-bottom: 36px;
    }

    .ve_form {
      .ve_submit {
        width: 100%;
      }

      :deep(.el-input-group__prepend) {
        padding: 0 10px;
      }
    }
  }
</style>